package RelUtilityClasses;

/**
 * An exception class for semantic errors.
 * 
 * @author Yevgeny Levanzov & Daniel Samuelov
 *
 */
public class SemanticError extends Exception {

	private String msg;

	private static final long serialVersionUID = 43L; /* impl. serializable. */

	/**
	 * A constructor.
	 * 
	 * @param msg the error message
	 */
	public SemanticError(String msg) {

		super();
		this.msg = msg;
	}

	/**
	 * Getter for error message. 
	 * 
	 * @return error message
	 */
	public String getMsg() {
		return this.msg;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {

		return ("Semantic error: " + this.msg);
	}

}
